<?php
$muntenLijst = "";
if(is_array($this->muntenLijst)&& count($this->muntenLijst)>0){
    foreach($this->muntenLijst as $munt){
        $muntenLijst .="\n".'<option value ="'.$munt['eenheid'].'"';
        if($this->overzicht['munt'] == $munt['eenheid']){
            $muntenLijst.= ' selected="selected"';
        }
        $muntenLijst .='>'.$munt['munt'].'</option>';
    }
}
$courierLijst = "";
if(is_array($this->couriers)&& count($this->couriers)>0){
    foreach($this->couriers as $courier){
        $courierLijst .='<option value ="'.$courier['courier'].'"';
        if($this->overzicht['courier'] == $courier['courier']){
            $courierLijst.= ' selected="selected"';
        }
        
        $courierLijst .='>'.$courier['courier'].'</option>';
    }
}
$inhoud = <<<EOD
<div class="container">
   <h1 class="text-center">Import Calculator</h1>
   <form class="form-horizontal" role="form" method="post" name="formulier">
       <div class="form-group">
           <label class="control-label col-lg-6 col-md-4 col-sm-4" for="munt">munt</label>
           <div class="col-lg-6 col-md-8 col-sm-8">
           <SELECT class="form-control" type="text" name="munt" id="munt">{$muntenLijst}</select>
           </div>
       </div>
       <div class="form-group">
           <label class="control-label col-lg-6 col-md-4 col-sm-4" for="aankoopbedrag">aankoopbedrag</label>
           <div class="col-lg-6 col-md-8 col-sm-8">
           <input class="form-control text-right" type="text" value="{$this->overzicht['aankoopbedrag']}" name="aankoopbedrag" id="aankoopbedrag">
           </div>
       </div>
       <div class="form-group">
           <label class="control-label col-lg-6 col-md-4 col-sm-4" for="verzendkosten">verzendkosten</label>
           <div class="col-lg-6 col-md-8 col-sm-8">
           <input class="form-control text-right" type="text" value="{$this->overzicht['verzendkosten']}" name="verzendkosten" id="verzendkosten">
           </div>
       </div>
       <div class="form-group">
               <label class="control-label col-lg-6 col-md-4 col-sm-4" for="invoerrechten">invoerrechten</label>
               <div class="col-lg-5 col-md-7 col-sm-7">
                   <input class="form-control text-right" type="text" value="{$this->overzicht['invoerrechten']}" name="invoerrechten" id="invoerrechten">
               </div>
                <div class="col-lg-1 col-md-1 col-sm-1">%</div>
       </div>
       <div class="form-group">
               <label class="control-label col-lg-6 col-md-4 col-sm-4" for="btw">btw</label>
               <div class="col-lg-5 col-md-7 col-sm-7">
                   <input class="form-control text-right" value="{$this->overzicht['btw']}" type="text" name="btw" id="btw">
               </div>
               <div class="col-lg-1 col-md-1 col-sm-1">%</div>
       </div>

       <div class="form-group">
           <label class="control-label col-lg-6 col-md-4 col-sm-4" for="courier">courier</label>
           <div class="col-lg-6 col-md-8 col-sm-8">
           <SELECT class="form-control" type="text" name="courier" id="courier">{$courierLijst}</select>
           </div>
        </div>
        <div class="form-group">
           <label class="control-label col-lg-6 col-md-4 col-sm-4" for="bereken">&nbsp;</label>
           <div class="col-lg-6 col-md-8 col-sm-8">
              <input class="btn btn-block btn-warning form-control text-center" type="submit" name="bereken" value="bereken" id="bereken">
           </div>
       
       </div>
   </form>
</div>
EOD;
//bib
if($this->berekend){
    $inhoud .=<<<EOD
    <div class="container">
        <div class="row">
            <div class="col-lg-6 col-md-4 col-sm-4">&nbsp;</div>
            <div class="col-lg-6 col-md-8 col-sm-8">
                <div class="alert alert-success">
                
                    <table class="table table-bordered table-condensed">
                        <tr>
                            <td>koers </td>
                            <td class="text-right">1 {$this->overzicht['munt']}=&euro; {$this->overzicht['koers']}</td>
            
                        </tr>
                        <tr>
                            <td>aankoopbedrag</td>
                            <td class="text-right">&euro; {$this->overzicht['aankoopbedrageuro']}</td>
            
                        </tr>
                        <tr>
                            <td>verzendkosten</td>
                            <td class="text-right">&euro; {$this->overzicht['verzendkosteneuro']}</td>
            
                        </tr> 
                        <tr>
                            <td>btw</td>
                            <td class="text-right">&euro; {$this->overzicht['btwbedrag']}</td>
            
                        </tr>
                                    <tr>
                            <td>inklaringskosten</td>
                            <td class="text-right">&euro; {$this->overzicht['invoerrechtenbedrag']}</td>
            
                        </tr> 
                                    <tr>
                            <td>courierkosten</td>
                            <td class="text-right">&euro; {$this->overzicht['coorierkosten']}</td>
            
                        </tr> 
                                    <tr>
                            <td>totaal</td>
                            <td class="text-right">&euro; {$this->overzicht['totaal']}</td>
            
                        </tr> 
                    </table>
                </div>
            
            </div>
            
        </div>    
    </div>
EOD;
}
           
$this->zet('inhoud',$inhoud);

